package com.jiutong.meipengdai.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by suxi on 2017/6/1.
 */

public class LoanRecordRespond extends BaseRespond implements Parcelable {

    private List<LoanRecordsBean> loanRecords;

    public List<LoanRecordsBean> getLoanRecords() {
        return loanRecords;
    }

    public void setLoanRecords(List<LoanRecordsBean> loanRecords) {
        this.loanRecords = loanRecords;
    }

    public static class LoanRecordsBean implements Parcelable {
        /**
         * loanId : 147
         * applyDate : 2017-06-05
         * houseCardFull : 碧海富通城
         * loanAmount : 485.00
         * loanDeadline : 0
         * deadlineUnit : null
         * loanRate : 3.4
         * loanStatus : 1
         * isCached : 0
         */

        private String loanId;
        private String applyDate;
        private String houseCardFull;
        private String loanAmount;
        private String loanDeadline;
        private String deadlineUnit;
        private String loanRate;
        private String loanStatus;
        private String isCached;

        public String getLoanId() {
            return loanId;
        }

        public void setLoanId(String loanId) {
            this.loanId = loanId;
        }

        public String getApplyDate() {
            return applyDate;
        }

        public void setApplyDate(String applyDate) {
            this.applyDate = applyDate;
        }

        public String getHouseCardFull() {
            return houseCardFull;
        }

        public void setHouseCardFull(String houseCardFull) {
            this.houseCardFull = houseCardFull;
        }

        public String getLoanAmount() {
            return loanAmount;
        }

        public void setLoanAmount(String loanAmount) {
            this.loanAmount = loanAmount;
        }

        public String getLoanDeadline() {
            return loanDeadline;
        }

        public void setLoanDeadline(String loanDeadline) {
            this.loanDeadline = loanDeadline;
        }

        public String getDeadlineUnit() {
            return deadlineUnit;
        }

        public void setDeadlineUnit(String deadlineUnit) {
            this.deadlineUnit = deadlineUnit;
        }

        public String getLoanRate() {
            return loanRate;
        }

        public void setLoanRate(String loanRate) {
            this.loanRate = loanRate;
        }

        public String getLoanStatus() {
            return loanStatus;
        }

        public void setLoanStatus(String loanStatus) {
            this.loanStatus = loanStatus;
        }

        public String getIsCached() {
            return isCached;
        }

        public void setIsCached(String isCached) {
            this.isCached = isCached;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.loanId);
            dest.writeString(this.applyDate);
            dest.writeString(this.houseCardFull);
            dest.writeString(this.loanAmount);
            dest.writeString(this.loanDeadline);
            dest.writeString(this.deadlineUnit);
            dest.writeString(this.loanRate);
            dest.writeString(this.loanStatus);
            dest.writeString(this.isCached);
        }

        public LoanRecordsBean() {
        }

        protected LoanRecordsBean(Parcel in) {
            this.loanId = in.readString();
            this.applyDate = in.readString();
            this.houseCardFull = in.readString();
            this.loanAmount = in.readString();
            this.loanDeadline = in.readString();
            this.deadlineUnit = in.readString();
            this.loanRate = in.readString();
            this.loanStatus = in.readString();
            this.isCached = in.readString();
        }

        public static final Creator<LoanRecordsBean> CREATOR = new Creator<LoanRecordsBean>() {
            @Override
            public LoanRecordsBean createFromParcel(Parcel source) {
                return new LoanRecordsBean(source);
            }

            @Override
            public LoanRecordsBean[] newArray(int size) {
                return new LoanRecordsBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeList(this.loanRecords);
    }

    public LoanRecordRespond() {
    }

    protected LoanRecordRespond(Parcel in) {
        this.loanRecords = new ArrayList<LoanRecordsBean>();
        in.readList(this.loanRecords, LoanRecordsBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<LoanRecordRespond> CREATOR = new Parcelable.Creator<LoanRecordRespond>() {
        @Override
        public LoanRecordRespond createFromParcel(Parcel source) {
            return new LoanRecordRespond(source);
        }

        @Override
        public LoanRecordRespond[] newArray(int size) {
            return new LoanRecordRespond[size];
        }
    };
}
